﻿using PLCS.Domain.Shared.Tasks;

namespace PLCS.PlcInteraction.Models;

public class PlcWorkParam
{
    /// <summary>
    /// 任务ID
    /// </summary>
    public int TaskId { get; set; }

    /// <summary>
    /// 任务类型 : ;1 工位行走； 2单取货；3 单放货；4取放货；5 单坐标行走；
    /// </summary>
    public InstructionType TaskType { get; set; }

    /// <summary>
    /// 托盘类型
    /// </summary>
    public TrayType TrayType { get; set; }

    /// <summary>
    /// 托盘数量 默认1
    /// </summary>
    public int TrayCount { get; set; }

    /// <summary>
    /// 起始工位
    /// </summary>
    public string StartPos { get; set; }

    /// <summary>
    /// 目标工位
    /// </summary>
    public string ToPos { get; set; }

    /// <summary>
    /// RGV工作工位
    /// </summary>
    public string WorkingStation { get; set; }

    /// <summary>
    /// 移动坐标，单坐标行走用
    /// </summary>
    public int MovePos { get; set; }

    /// <summary>
    /// 物料尺寸类型
    /// </summary>
    public int MaterialSize { get; set; }

    public PlcWorkParam(int taskId, InstructionType taskType, TrayType trayType, int trayCount, string startPos, string toPos, string workingStation, int movePos, int materialSize)
    {
        TaskId = taskId;
        TaskType = taskType;
        TrayType = trayType;
        TrayCount = trayCount;
        StartPos = startPos;
        ToPos = toPos;
        WorkingStation = workingStation;
        MovePos = movePos;
        MaterialSize = materialSize;
    }
}